<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>个人主页</title>
    <link rel="stylesheet" th:href="@{/layui/css/font.css}">
    <link rel="stylesheet" th:href="@{/layui/css/xadmin.css}">
    <link rel="stylesheet" th:href="@{/layui/css/login.css}">
    <link rel="stylesheet" th:href="@{/css/company.css}">
    <script charset="utf-8" th:src="@{/layui/lib/layui/layui.js}"></script>
    <script th:src="@{/layui/js/xadmin.js}" type="text/javascript"></script>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        body {
            background: rgb(235, 235, 235);
        }

        a {
            text-decoration: none;
            color: white;
        }

        li {
            list-style: none;
            font-size: 20px;
        }
    </style>
</head>
<body>
<div id="header">
    <div id="name">
        <label for="idNum"></label><input id="idNum" style="display: none" th:value="${session.company.id}"/>
        欢迎回来:<a href="javascript:" th:text="${session.company.companyName}"></a><i class="iconfont" id="down_up">&#xe6a6;</i>
        <ul>
            <li><a href="javascript:"
                   onclick="xadmin.open('添加兼职信息', '/add_pt_message?id='+idNum,'900','750',false)">添加兼职信息</a></li>
        </ul>
    </div>
    <a th:href="@{/index}" id="logo">领贤兼职</a>
    <div id="nav">
        <ul>
            <li><a th:href="@{/index}">首页</a></li>
            <li><a th:href="@{/range}">领贤兼职</a></li>
            <li><a th:href="@{/company_log_out}">退出登录</a></li>
            <li><a th:href="@{/student_login}">学生登陆</a></li>
            <li><a th:href="@{/university_login}">学校服务</a></li>
        </ul>
    </div>
</div>

<div id="info">
    <div class="login layui-anim layui-anim-up" style="max-width: 70%;height: 500px;">
        <div class="message"></div>
        <hr class="hr20">
        <div style="margin: 60px 0 0 50px; width: 200px; height: 200px;float: left">
            <img alt="" src="" style="height: 100%;width: 100%" th:src="${session.company.portrait}">
        </div>
        <form style="float: left; width: 65%;margin-left: 60px">
            <hr class="hr20">
            <div class="left" style="float: left;width: 50%">
                <label for="companyName">公司名字&emsp;</label>
                <input class="layui-input" id="companyName" name="companyName"
                       th:value="${session.company.companyName}"
                       type="text">
                <hr class="hr15">
                <label for="industryName">行业类型&emsp;</label>
                <input class="layui-input" id="industryName" name="industryName"
                       th:value="${session.company.industry.industryName}" type="text">
                <hr class="hr15">
                <label for="cityName">所在城市&emsp;</label>
                <input class="layui-input" id="cityName" name="v"
                       th:value="${session.company.city.cityName}"
                       type="text">
                <hr class="hr15">
            </div>

            <div class="left" style="float: left;width: 50%">
                <label for="phone">联系方式&emsp;</label>
                <input class="layui-input" id="phone" name="phone"
                       th:value="${session.company.phone}" type="text">
                <hr class="hr15">
                <label for="HRName">HR姓名&emsp;</label>
                <input class="layui-input" id="HRName" name="HRName"
                       th:value="${session.company.hrName}" type="text">
                <hr class="hr15">
                <label for="HRPhone">HR电话&emsp;</label>
                <input class="layui-input" id="HRPhone" name="HRPhone"
                       th:value="${session.company.hrPhone}" type="text">
            </div>
            <div id="introductionDiv" style="margin-top: 200px">
                <label for="introduction">公司描述&emsp;</label>
                <input class="layui-input" id="introduction" name="introduction"
                       style="width: 480px" th:value="${session.company.introduction}"
                       type="text">
                <hr class="hr20">
            </div>

        </form>
    </div>
</div>

<div id="ptReaMessage">
    <div class="login layui-anim layui-anim-up" style="max-width: 80%">
        <div class="message"></div>
        <hr class="hr20">
        <form style="width: 90%;margin-left: 80px">
            <hr class="hr20">
            <div>
                <label for="export_pt"></label><input class="layui-input titles" id="export_pt" style="border: none"
                                                      th:value="已发布的兼职信息" value="">
                <hr class="hr10">
                <div th:each="partTimeMessageListReady: ${session.partTimeMessageListReady}">
                    <hr>
                    <div class="mes" style="border-bottom: 1px black solid">
                        <div class="left">
                            <label class="layui-form-label" for="message">兼职信息:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="message" name="message"
                                       th:value="${partTimeMessageListReady.message}"
                                       type="text" value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="hireNum">招聘人数:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="hireNum" name="hireNum"
                                       th:value="${partTimeMessageListReady.hireNum}"
                                       type="text" value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="releaseTime">发布时间:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="releaseTime" name="releaseTime"
                                       th:value="${#dates.format(partTimeMessageListReady.releaseTime,'yyyy-MM-dd HH:mm:ss')}"
                                       type="text" value="">
                            </div>
                        </div>
                        <div class="left" style="width: 100%">
                            <label class="layui-form-label" for="salary">工资待遇:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="salary"
                                       name="salary" style="width: 500px"
                                       th:value="${partTimeMessageListReady.salary}"
                                       type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="workTime">工作时间:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="workTime" name="workTime"
                                       th:value="${partTimeMessageListReady.workTimeStart}+'~'+${partTimeMessageListReady.workTimeEnd}"
                                       type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="workCity">工作地点:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="workCity" name="workCity"
                                       th:value="${partTimeMessageListReady.city.cityName}" type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="workJob">工作岗位:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="workJob" name="workJob"
                                       th:value="${partTimeMessageListReady.job.jobName}" type="text"
                                       value="">
                            </div>
                        </div>
                    </div>


                    <div class="detail">
                        <label for="workDetails"></label><input class="layui-input titles" id="workDetails"
                                                                style="border: none"
                                                                th:value="工作详情" value="">
                        <div class="left">
                            <label class="layui-form-label" for="duty">工作职责:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="duty" name="duty"
                                       th:value="${partTimeMessageListReady.workDetail.duty}" type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="requestMessage">工作需求:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="requestMessage" name="requestMessage"
                                       th:value="${partTimeMessageListReady.workDetail.requestMessage}" type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="joinMessage">加入须知:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="joinMessage" name="joinMessage"
                                       th:value="${partTimeMessageListReady.workDetail.joinMessage}" type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="contact">联系方式:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="contact" name="contact"
                                       th:value="${partTimeMessageListReady.workDetail.contact}" type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="detailSalary">详情待遇:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="detailSalary" name="detailSalary"
                                       th:value="${partTimeMessageListReady.workDetail.salary}" type="text"
                                       value="">
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </form>
    </div>
</div>

<div id="ptNotReaMessage">
    <div class="login layui-anim layui-anim-up" style="max-width: 80%">
        <div class="message"></div>
        <hr class="hr20">
        <form style="width: 90%;margin-left: 80px">
            <hr class="hr20">
            <div>
                <label for="export_pt_notRea"></label><input class="layui-input titles" id="export_pt_notRea"
                                                             style="border: none"
                                                             th:value="未发布的兼职信息" value="">
                <hr class="hr10">
                <div th:each="partTimeMessageListNotReady: ${session.partTimeMessageListNotReady}">
                    <hr>
                    <div class="mes" style="border-bottom: 1px black solid">
                        <div class="left">
                            <label class="layui-form-label" for="message_notRea">兼职信息:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="message_notRea" name="message"
                                       th:value="${partTimeMessageListNotReady.message}"
                                       type="text" value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="hireNum_notRea">招聘人数:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="hireNum_notRea" name="hireNum"
                                       th:value="${partTimeMessageListNotReady.hireNum}"
                                       type="text" value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="releaseTime_notRea">发布时间:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="releaseTime_notRea" name="releaseTime"
                                       th:value="${#dates.format(partTimeMessageListNotReady.releaseTime,'yyyy-MM-dd HH:mm:ss')}"
                                       type="text" value="">
                            </div>
                        </div>
                        <div class="left" style="width: 100%">
                            <label class="layui-form-label" for="salary_notRea">工资待遇:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="salary_notRea"
                                       name="salary" style="width: 500px"
                                       th:value="${partTimeMessageListNotReady.salary}"
                                       type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="workTime_notRea">工作时间:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="workTime_notRea" name="workTime"
                                       th:value="${partTimeMessageListNotReady.workTimeStart}+'~'+${partTimeMessageListNotReady.workTimeEnd}"
                                       type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="workCity_notRea">工作地点:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="workCity_notRea" name="workCity"
                                       th:value="${partTimeMessageListNotReady.city.cityName}" type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="workJob_notRea">工作岗位:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="workJob_notRea" name="workJob"
                                       th:value="${partTimeMessageListNotReady.job.jobName}" type="text"
                                       value="">
                            </div>
                        </div>
                    </div>


                    <div class="detail">
                        <label for="workDetails_notRea"></label><input class="layui-input titles"
                                                                       id="workDetails_notRea"
                                                                       style="border: none"
                                                                       th:value="工作详情" value="">
                        <div class="left">
                            <label class="layui-form-label" for="duty_notRea">工作职责:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="duty_notRea" name="duty"
                                       th:value="${partTimeMessageListNotReady.workDetail.duty}" type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="requestMessage_notRea">工作需求:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="requestMessage_notRea" name="requestMessage"
                                       th:value="${partTimeMessageListNotReady.workDetail.requestMessage}" type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="joinMessage_notRea">加入须知:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="joinMessage_notRea" name="joinMessage"
                                       th:value="${partTimeMessageListNotReady.workDetail.joinMessage}" type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="contact_notRea">联系方式:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="contact_notRea" name="contact"
                                       th:value="${partTimeMessageListNotReady.workDetail.contact}" type="text"
                                       value="">
                            </div>
                        </div>
                        <div class="left">
                            <label class="layui-form-label" for="detailSalary_notRea">详情待遇:</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" id="detailSalary_notRea" name="detailSalary"
                                       th:value="${partTimeMessageListNotReady.workDetail.salary}" type="text"
                                       value="">
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </form>
    </div>
</div>

<div id="footer" style="width: 100%;height: 50px"></div>

<script type="text/javascript">
    window.onload = function () {
        const input = document.getElementsByClassName("layui-input");
        for (let i = 0; i < input.length; i++) {
            input[i].setAttribute('readonly', 'true');
        }
    }
</script>
<script>
    const idNum = document.getElementById("idNum").value;
</script>
</body>
</html>